//
//  IntergralCell.m
//  YYPHSpeedJump
//
//  Created by sujiang on 16/2/3.
//  Copyright © 2016年 sujiang. All rights reserved.
//

#import "IntergralCell.h"

@implementation IntergralCell

- (void)awakeFromNib {
    self.layer.borderWidth = 1.0f;
    self.layer.borderColor = kColors(153, 153, 153, 0.6).CGColor;
    self.layer.masksToBounds = YES;
    self.backgroundColor = kColors(255, 255, 255, 1);
}


- (void)setModel:(MallModel *)model
{
    [self.goodPic sd_setImageWithURL:[NSURL URLWithString:model.img_url] placeholderImage:[UIImage imageNamed:@"tu-xiao"]];
    self.name.text = model.mall_name;
    self.useForLb.text = model.descript;

    NSString *string = [NSString stringWithFormat:@"%@积分", model.integral_need];
    NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:string];
    
    [str addAttribute:NSForegroundColorAttributeName value:kColors(102, 102, 102, 1) range:NSMakeRange(string.length - 2,2)];
    [str addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:13] range:NSMakeRange(string.length - 2, 2)];
    self.intergral.attributedText = str;
    
}



@end
